<div class="row wrapper border-bottom white-bg page-heading">
    <div class="col-md-6">
        <h2>添加分类</h2>
        <ol class="breadcrumb">
            <li>
                <a href="index.html">主页</a>
            </li>
            <li class="active">
                <strong>添加分类</strong>
            </li>
        </ol>
    </div>
    <div class="col-md-6">
    </div>
</div>


<div class="wrapper wrapper-content">
    <div class="ibox float-e-margins">
        <div class="ibox-title">
            <h5>分类列表</h5>
            <div class="ibox-tools">
                <a class="collapse-link">
                    <i class="fa fa-chevron-up"></i>
                </a>
                <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                    <i class="fa fa-wrench"></i>
                </a>
                <ul class="dropdown-menu dropdown-user">
                    <li><a href="#">Config option 1</a>
                    </li>
                    <li><a href="#">Config option 2</a>
                    </li>
                </ul>
                <a class="close-link">
                    <i class="fa fa-times"></i>
                </a>
            </div>
        </div>
        <div class="ibox">
            <div class="ibox-content">
                <form action="{:U('admin/catalog/do_add')}" method="post" class="form-horizontal">
                    <div class="form-group"><label class="col-sm-2 control-label">分类名称：</label>
                        <div class="col-sm-8"><input type="text" name="title" class="form-control"></div>
                    </div>
                    <div class="form-group"><label class="col-sm-2 control-label">分类</label>
                        <div class="col-sm-3">
                            <select name="parent_id" class="form-control">
                                <option value="0">一级分类</option>
                                <volist name="level1" id="l1">
                                    <option value="{$l1.id}">{$l1.name}</option>
                                    <?php 
                                        $level2 = M('product_catalog')->where('parent_id = '.$l1['id'])->select();
                                    ?>
                                    <volist name="level2" id="l2">
                                        <option value="{$l2.id}">◢{$l2.name}</option>
                                    </volist>
                                </volist>
                            </select>
                            <br />
                             <div class="form-group"> 
                                <div class="col-sm-12">
                                    <button class="btn btn-primary" >保存</button>
                                </div>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>